package com.xebia.mongodb.benchmark.domain;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.bson.types.ObjectId;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.layers.repository.mongo.RooMongoEntity;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooMongoEntity(identifierType = ObjectId.class)
public class Document {

    @NotNull
    private long someKey;

    @NotNull
    @Size(max = 20000)
    private String text;

    public Document(long someKey, String text) {
        this.someKey = someKey;
        this.text = text;
    }
    
    public Document() {
    }
    

}
